home *** CD-ROM | disk | FTP | other *** search
/ IRIX 6.2 Development Libraries / SGI IRIX 6.2 Development Libraries.iso / dist / gl_dev.idb / usr / include / gl / glconsts.h.z / glconsts.h
Encoding:
C/C++ Source or Header  |  1996-03-15  |  23.0 KB  |  931 lines

  1. #ifndef __GL_GLCONSTS_H__
  2. #define __GL_GLCONSTS_H__
  3. /**************************************************************************
  4.  *                                      *
  5.  *          Copyright (C) 1984, Silicon Graphics, Inc.          *
  6.  *                                      *
  7.  *  These coded instructions, statements, and computer programs  contain  *
  8.  *  unpublished  proprietary  information of Silicon Graphics, Inc., and  *
  9.  *  are protected by Federal copyright law.  They  may  not be disclosed  *
  10.  *  to  third  parties  or copied or duplicated in any form, in whole or  *
  11.  *  in part, without the prior written consent of Silicon Graphics, Inc.  *
  12.  *                                      *
  13.  **************************************************************************/
  14.  
  15. #if 0
  16. Lines encapulated by #if 0/#endif will not appear in the public gl.h
  17. #endif
  18.  
  19. /* Graphics Libary constants */
  20.  
  21. #ifndef    NULL
  22. #define NULL            0
  23. #endif
  24.  
  25. #ifndef    FALSE
  26. #define FALSE            0
  27. #endif
  28.  
  29. #ifndef    TRUE
  30. #define TRUE            1
  31. #endif
  32.  
  33.  
  34. /* various hardware/software limits */
  35. #define ATTRIBSTACKDEPTH    10
  36. #define VPSTACKDEPTH        8
  37. #define MATRIXSTACKDEPTH    32
  38. #define NAMESTACKDEPTH        1025
  39.  
  40. /* special pre-defined tags */
  41. #define STARTTAG        -2
  42. #define ENDTAG            -3
  43.  
  44. /* names for colors in color map loaded by greset */
  45. #define BLACK            0
  46. #define RED            1
  47. #define GREEN            2
  48. #define YELLOW            3
  49. #define BLUE            4
  50. #define MAGENTA            5
  51. #define CYAN            6
  52. #define WHITE            7
  53.  
  54. /* popup colors */
  55. #define PUP_CLEAR        0
  56. #define PUP_COLOR        1
  57. #define PUP_BLACK        2
  58. #define PUP_WHITE        3
  59.  
  60. /* defines for drawmode and mswapbuffers*/
  61. #define NORMALDRAW        0x010
  62. #define PUPDRAW            0x020
  63. #define OVERDRAW        0x040
  64. #define UNDERDRAW        0x080
  65. #define CURSORDRAW        0x100
  66. #define DUALDRAW        0x200    /* obselete skywriter only */
  67. #define GANGDRAW        0x200    /* not available on skywriter */
  68. #define HYPER0            0x10000
  69. #define HYPER1            0x20000
  70. #define HYPER2            0x40000
  71.  
  72. /* defines for defpattern */
  73. #define PATTERN_16        16
  74. #define PATTERN_32        32
  75. #define PATTERN_64        64
  76.  
  77. #define PATTERN_16_SIZE        16
  78. #define PATTERN_32_SIZE        64
  79. #define PATTERN_64_SIZE        256
  80.  
  81. /* defines for readsource */
  82. #define SRC_NULL        -1
  83. #define SRC_AUTO        0
  84. #define SRC_FRONT        1
  85. #define SRC_FRONTLEFT         1
  86. #define SRC_BACK        2
  87. #define SRC_BACKLEFT         2
  88. #define SRC_ZBUFFER        3
  89. #define SRC_PUP            4
  90. #define SRC_OVER        5
  91. #define SRC_UNDER        6
  92. #define SRC_FRAMEGRABBER     7
  93. #define SRC_FRONTRIGHT         8
  94. #define SRC_BACKRIGHT         9
  95. #define SRC_ILBUFFER_1        1000
  96. #define SRC_ILBUFFER_2        1001
  97. #define SRC_ILBUFFER_3        1002
  98. #define SRC_ILBUFFER_4        1003
  99. #define SRC_ILBUFFER_5        1004
  100. #define SRC_ILBUFFER_6        1005
  101. #define SRC_ILBUFFER_7        1006
  102. #define SRC_ILBUFFER_8        1007
  103. #define SRC_ILBUFFER_9        1008
  104. #define SRC_ILBUFFER_10        1009
  105. #define SRC_ILBUFFER_11        1010
  106. #define SRC_ILBUFFER_12        1011
  107. #define SRC_ILBUFFER_13        1012
  108. #define SRC_ILBUFFER_14        1013
  109. #define SRC_ILBUFFER_15        1014
  110. #define SRC_ILBUFFER_16        1015
  111.  
  112. /* minmax */
  113. #define MINMAX_ENABLE           0
  114. #define MINMAX_DISABLE          1
  115. #define MINMAX_INIT             2
  116.  
  117. /* histogram */
  118. #define HIST_ENABLE        0
  119. #define HIST_DISABLE        1
  120. #define HIST_CLEAR        2
  121.  
  122. /* defines for readcomponent */
  123. #define RC_ABGR            4
  124. #define RC_ALPHA        0
  125. #define RC_BLUE            1
  126. #define RC_GREEN        2
  127. #define RC_RED            3
  128.  
  129. /* defines for blendfunction */
  130. #define BF_ZERO            0
  131. #define BF_ONE            1
  132. #define BF_DC            2
  133. #define BF_SC            2
  134. #define BF_MDC            3
  135. #define BF_MSC            3
  136. #define BF_SA            4
  137. #define BF_MSA            5
  138. #define BF_DA            6
  139. #define BF_MDA            7
  140. #define BF_MIN_SA_MDA        8
  141. #define BF_CA            9
  142. #define BF_MCA            10
  143. #define BF_CC            11
  144. #define BF_MCC            12
  145. #define BF_MIN            13
  146. #define BF_MAX            14
  147.  
  148. /* defines for afunction */
  149. #define AF_NEVER            0
  150. #define AF_LESS             1
  151. #define AF_EQUAL            2
  152. #define AF_LEQUAL           3
  153. #define AF_GREATER          4
  154. #define AF_NOTEQUAL         5
  155. #define AF_GEQUAL           6
  156. #define AF_ALWAYS           7
  157.  
  158. /* defines for zfunction */
  159. #define ZF_NEVER        0
  160. #define ZF_LESS            1
  161. #define ZF_EQUAL        2
  162. #define ZF_LEQUAL        3
  163. #define ZF_GREATER        4
  164. #define ZF_NOTEQUAL        5
  165. #define ZF_GEQUAL        6
  166. #define ZF_ALWAYS        7
  167.  
  168. /* defines for zsource */
  169. #define ZSRC_DEPTH        0
  170. #define ZSRC_COLOR        1
  171.  
  172. /* defines for pntsmooth */
  173. #define SMP_OFF            0x0
  174. #define SMP_ON            0x1
  175. #define SMP_SMOOTHER        0x2
  176.  
  177. /* defines for linesmooth */
  178. #define SML_OFF            0x0
  179. #define SML_ON            0x1
  180. #define SML_SMOOTHER        0x2
  181. #define SML_END_CORRECT        0x4
  182.  
  183. /* defines for polysmooth, NOTE, these must be decimal to allow
  184.  * macros in STAPUFT pe ucode (modes.m) to build
  185.  */
  186. #define PYSM_OFF                0
  187. #define PYSM_ON                 1
  188. #define PYSM_SHRINK             2
  189.  
  190. /* defines for msalpha */
  191. #define MSA_MASK        0x0
  192. #define MSA_MASK_ONE        0x1
  193. #define MSA_ALPHA        0x2
  194.  
  195. /* defines for mssample */
  196. #define MSS_POINT        0x0
  197. #define MSS_AREA        0x1
  198. #define MSS_CENTER_POINT    0x2
  199.  
  200. /* defines for mspattern */
  201. #define MSP_DEFAULT        0x0
  202. #define MSP_2PASS_0        0x1
  203. #define MSP_2PASS_1        0x2
  204. #define MSP_4PASS_0        0x3
  205. #define MSP_4PASS_1        0x4
  206. #define MSP_4PASS_2        0x5
  207. #define MSP_4PASS_3        0x6
  208.  
  209. /* dither modes    */
  210. #define DT_OFF            0
  211. #define DT_ON            1
  212.  
  213. /* defines for setpup */
  214. #define PUP_NONE        0
  215. #define PUP_GREY        0x1
  216. #define PUP_BOX            0x2
  217. #define PUP_CHECK        0x4
  218.  
  219. /* defines for glcompat */
  220. #define GLC_OLDPOLYGON        0
  221. #define GLC_ZRANGEMAP        1
  222. #define GLC_MQUEUERATE        2
  223. #define GLC_SOFTATTACH        3
  224. #define GLC_MANAGEBG        4
  225. #define GLC_SLOWMAPCOLORS    5
  226. #define GLC_INPUTCHANGEBUG    6
  227. #define GLC_NOBORDERBUG        7
  228. #define GLC_SET_VSYNC        8
  229. #define GLC_GET_VSYNC        9
  230. #define GLC_VSYNC_SLEEP        10
  231. #define GLC_FORCECIMAP        11
  232. #define GLC_TABLETSCALE        12
  233. #define GLC_NODESTALPHA        13
  234. #define GLC_ILCMD        1008
  235. #define GLC_IL_READCOMPONENT    0
  236. #define GLC_IL_RECTZOOMOFF    1
  237. #define GLC_IL_CONVOLVE        2
  238. #define GLC_IL_LRECTPROC    3
  239. #define GLC_IL_HISTOGRAM    4
  240. #define GLC_IL_GETHISTOGRAM    5
  241. #define GLC_IL_MINMAX        6
  242. #define GLC_IL_GETMINMAX    7
  243. #define GLC_IL_PIXELMAP        8
  244. #define GLC_IL_PIXELTRANSFER    9
  245. #define GLC_IL_ILBUFFER        0xa
  246. #define GLC_IL_ILDRAW        0xb
  247. #define GLC_IL_SUBTEXLOAD    0xc
  248. #define GLC_IL_LEFTBUFFER    0xd
  249. #define GLC_IL_RIGHTBUFFER    0xe
  250. #define GLC_IL_STEREOBUFFER    0xf
  251. #define GLC_IL_MONOBUFFER    0x10
  252. #define GLC_IL_FBSUBTEXLOAD    0x11
  253. #define GLC_IL_ISTEXLOADED    0x12
  254. #define GLC_IL_BLENDCOLOR    0x13
  255.  
  256. /* value for GLC_MQUEUERATE which is compatible with 3.3 */
  257. #define GLC_COMPATRATE        15
  258. /* value for GLC_MQUEUERATE which causes maximum compression */
  259. #define GLC_CMPRESS        1
  260.  
  261. /* defines for curstype */
  262. #define C16X1            0
  263. #define C16X2            1
  264. #define C32X1            2
  265. #define C32X2            3
  266. #define CCROSS            4
  267.  
  268. /* defines for shademodel */
  269. #define FLAT            0    /* For compatibility */
  270. #define GOURAUD            1    /* For compatibility */
  271.  
  272. /* defines for logicop */
  273. #define LO_ZERO            0x0
  274. #define LO_AND            0x1
  275. #define LO_ANDR            0x2
  276. #define LO_SRC            0x3
  277. #define LO_ANDI            0x4
  278. #define LO_DST            0x5
  279. #define LO_XOR            0x6
  280. #define LO_OR            0x7
  281. #define LO_NOR            0x8
  282. #define LO_XNOR            0x9
  283. #define LO_NDST            0xa
  284. #define LO_ORR            0xb
  285. #define LO_NSRC            0xc
  286. #define LO_ORI            0xd
  287. #define LO_NAND            0xe
  288. #define LO_ONE            0xf
  289.  
  290. /* define for scrnselect */
  291. #define INFOCUSSCRN        -2
  292.  
  293. /* defines for stencil */
  294. #define ST_KEEP            0
  295. #define ST_ZERO            1
  296. #define ST_REPLACE        2
  297. #define ST_INCR            3
  298. #define ST_DECR            4
  299. #define ST_INVERT        5
  300. #define SF_NEVER        0
  301. #define SF_LESS            1
  302. #define SF_EQUAL        2
  303. #define SF_LEQUAL        3
  304. #define SF_GREATER        4
  305. #define SF_NOTEQUAL        5
  306. #define SF_GEQUAL        6
  307. #define SF_ALWAYS        7
  308.  
  309. /* defines for scrsubdivide */
  310. #define SS_OFF            0
  311. #define SS_DEPTH        1
  312.  
  313. /* defines for polymode */
  314. #define PYM_FILL        1
  315. #define PYM_POINT        2
  316. #define PYM_LINE        3
  317. #define PYM_HOLLOW        4
  318. #define PYM_LINE_FAST        5
  319.  
  320. /* defines for fogvertex */
  321. #define FG_OFF            0
  322. #define FG_ON            1
  323. #define FG_DEFINE        2
  324. #define FG_VTX_EXP        2 /* aka FG_DEFINE*/
  325. #define FG_VTX_LIN        3
  326. #define FG_PIX_EXP        4
  327. #define FG_PIX_LIN        5
  328. #define FG_VTX_EXP2        6 
  329. #define FG_PIX_EXP2        7
  330.  
  331. /* defines for pixmode */
  332. #define PM_SHIFT        0
  333. #define PM_EXPAND        1
  334. #define PM_C0            2
  335. #define PM_C1            3
  336. #define PM_ADD24        4
  337. #define PM_SIZE            5
  338. #define PM_OFFSET        6
  339. #define PM_STRIDE        7
  340. #define PM_TTOB            8
  341. #define PM_RTOL            9
  342. #define PM_ZDATA        10
  343. #define PM_WARP            11
  344. #define PM_RDX            12
  345. #define PM_RDY            13
  346. #define PM_CDX            14
  347. #define PM_CDY            15
  348. #define PM_XSTART        16
  349. #define PM_YSTART        17
  350. #define PM_VO1            1000    /* internal use only */
  351.  
  352. /* defines for VENICE float path pixels/texels */
  353. #define PM_INPUT_FORMAT        11
  354. #define PM_INPUT_TYPE        12
  355. #define PM_OUTPUT_FORMAT    13
  356. #define PM_OUTPUT_TYPE        14
  357. #define PM_ABGR            0
  358. #define PM_BGR            1
  359. #define PM_RGBA            2
  360. #define PM_RGB            3
  361. #define PM_LUMINANCE        4
  362. #define PM_LUMINANCEA        5
  363. #define PM_ALPHA        6
  364. #define PM_COLOR_INDEX        7
  365. #define PM_STENCIL_INDEX    8
  366. #define PM_DEPTH        9
  367. #define PM_RED            10
  368. #define PM_GREEN        11
  369. #define PM_BLUE            12
  370.  
  371.  
  372. #define PM_BITMAP        0
  373. #define PM_BYTE            1
  374. #define PM_UNSIGNED_BYTE    2
  375. #define PM_SHORT_12        3
  376. #define PM_UNSIGNED_SHORT_12    4
  377. #define PM_SHORT        5
  378. #define PM_UNSIGNED_SHORT    6
  379. #define PM_INT            7
  380. #define PM_UNSIGNED_INT        8
  381. #define PM_FLOAT        9
  382.  
  383. /* defines for convolve */
  384. #define CV_OFF            0
  385. #define CV_GENERAL        1
  386. #define CV_SEPARABLE        2
  387. #define CV_REDUCE        1
  388.  
  389. /* defines for pixelmap */
  390. #define MAP_I_TO_I        0
  391. #define MAP_I_TO_R        1
  392. #define MAP_I_TO_G        2
  393. #define MAP_I_TO_B        3
  394. #define MAP_I_TO_A        4
  395. #define MAP_R_TO_R        5
  396. #define MAP_G_TO_G        6
  397. #define MAP_B_TO_B        7
  398. #define MAP_A_TO_A        8
  399.  
  400. /* defines for pixeltransfer */
  401. #define PT_MAP_COLOR        0
  402. #define PT_MAP_DISABLE        0
  403. #define PT_MAP_CLAMP        1
  404. #define PT_MAP_ENABLE        2
  405.  
  406. #define PT_RED_SCALE        1
  407. #define PT_RED_BIAS        2
  408. #define PT_GREEN_SCALE        3
  409. #define PT_GREEN_BIAS        4
  410. #define PT_BLUE_SCALE        5
  411. #define PT_BLUE_BIAS        6
  412. #define PT_ALPHA_SCALE        7
  413. #define PT_ALPHA_BIAS        8
  414.  
  415. /* defines for nmode */
  416. #define NAUTO            0
  417. #define NNORMALIZE        1
  418.  
  419. /* defines for acbuf */
  420. #define AC_CLEAR                0
  421. #define AC_ACCUMULATE           1
  422. #define AC_CLEAR_ACCUMULATE     2
  423. #define AC_RETURN               3
  424. #define AC_MULT                 4
  425. #define AC_ADD                  5
  426.  
  427. /* defines for clipplane */
  428. #define CP_OFF                  0
  429. #define CP_ON                   1
  430. #define CP_DEFINE               2
  431.  
  432. /* defines for scrbox */
  433. #define SB_RESET                0
  434. #define SB_TRACK                1
  435. #define SB_HOLD                 2
  436.  
  437.  
  438. /* defines for readdisplay */
  439. #define RD_FREEZE        0x00000001
  440. #define RD_ALPHAONE        0x00000002
  441. #define RD_IGNORE_UNDERLAY    0x00000004
  442. #define RD_IGNORE_OVERLAY    0x00000008
  443. #define RD_IGNORE_PUP        0x00000010
  444. #define RD_OFFSCREEN        0x00000020
  445.  
  446. /* defines for getgconfig */
  447. #define GC_BITS_CMODE        0
  448. #define GC_BITS_RED        1
  449. #define GC_BITS_GREEN        2
  450. #define GC_BITS_BLUE        3
  451. #define GC_BITS_ALPHA        4
  452. #define GC_BITS_ZBUFFER        5
  453. #define GC_ZMIN            6
  454. #define GC_ZMAX            7
  455. #define GC_BITS_STENCIL        8
  456. #define GC_BITS_ACBUF        9
  457. #define GC_MS_SAMPLES        10
  458. #define GC_BITS_MS_ZBUFFER    11
  459. #define GC_MS_ZMIN        12
  460. #define GC_MS_ZMAX        13
  461. #define GC_BITS_MS_STENCIL    14
  462. #define GC_STEREO        15
  463. #define GC_DOUBLE        16
  464.  
  465.  
  466. /* 
  467.  * START defines for getgdesc 
  468.  */
  469.  
  470. #define GD_XPMAX        0
  471. #define GD_YPMAX        1
  472. #define GD_XMMAX        2
  473. #define GD_YMMAX        3
  474. #define GD_ZMIN            4
  475. #define GD_ZMAX            5
  476. #define GD_BITS_NORM_SNG_RED    6
  477. #define GD_BITS_NORM_SNG_GREEN    7
  478. #define GD_BITS_NORM_SNG_BLUE    8
  479. #define GD_BITS_NORM_DBL_RED    9
  480. #define GD_BITS_NORM_DBL_GREEN    10
  481. #define GD_BITS_NORM_DBL_BLUE    11
  482. #define GD_BITS_NORM_SNG_CMODE    12
  483. #define GD_BITS_NORM_DBL_CMODE    13
  484. #define GD_BITS_NORM_SNG_MMAP    14
  485. #define GD_BITS_NORM_DBL_MMAP    15
  486. #define GD_BITS_NORM_ZBUFFER    16
  487. #define GD_BITS_OVER_SNG_CMODE    17
  488. #define GD_BITS_UNDR_SNG_CMODE    18
  489. #define GD_BITS_PUP_SNG_CMODE    19
  490. #if 0
  491. NOTE: 0->19 used in DaVinci PI release --- DO NOT CHANGE THEM
  492. New defines for Aspen/Birch start here.....
  493. #endif
  494. #define GD_BITS_NORM_SNG_ALPHA    21 
  495. #define GD_BITS_NORM_DBL_ALPHA    22
  496. #define GD_BITS_CURSOR        23
  497. #define GD_OVERUNDER_SHARED    24
  498. #define GD_BLEND        25
  499. #define GD_CIFRACT        26
  500. #define GD_CROSSHAIR_CINDEX    27
  501. #define GD_DITHER        28
  502. #define GD_LINESMOOTH_CMODE    30
  503. #define GD_LINESMOOTH_RGB    31
  504. #define GD_LOGICOP        33
  505. #define GD_NSCRNS        35
  506. #define GD_NURBS_ORDER        36
  507. #define GD_NBLINKS        37
  508. #define GD_NVERTEX_POLY        39
  509. #define GD_PATSIZE_64        40
  510. #define GD_PNTSMOOTH_CMODE    41
  511. #define GD_PNTSMOOTH_RGB    42
  512. #define GD_PUP_TO_OVERUNDER    43
  513. #define GD_READSOURCE        44
  514. #define GD_READSOURCE_ZBUFFER    48
  515. #define GD_STEREO        50
  516. #define GD_SUBPIXEL_LINE    51
  517. #define GD_SUBPIXEL_PNT        52
  518. #define GD_SUBPIXEL_POLY    53
  519. #define GD_TRIMCURVE_ORDER    54
  520. #define GD_WSYS            55
  521. #define GD_ZDRAW_GEOM        57
  522. #define GD_ZDRAW_PIXELS        58
  523. #define GD_SCRNTYPE        61
  524. #define GD_TEXTPORT        62
  525. #define GD_NMMAPS        63
  526. #define GD_FRAMEGRABBER        64
  527. #define GD_TIMERHZ        66
  528. #define GD_DBBOX        67
  529. #define GD_AFUNCTION        68
  530. #define GD_ALPHA_OVERUNDER    69
  531. #define GD_BITS_ACBUF        70
  532. #define GD_BITS_ACBUF_HW    71
  533. #define GD_BITS_STENCIL        72
  534. #define GD_CLIPPLANES        73
  535. #define GD_FOGVERTEX        74
  536. #define GD_LIGHTING_TWOSIDE    76
  537. #define GD_POLYMODE        77
  538. #define GD_POLYSMOOTH        78
  539. #define GD_SCRBOX        79
  540. #define GD_TEXTURE        80
  541. #define GD_FOGPIXEL        81
  542. #define GD_TEXTURE_PERSP    82
  543. #define GD_MUXPIPES        83
  544. #define GD_MULTISAMPLE        84
  545. #define GD_TEXTURE_3D        85
  546. #define GD_TEXTURE_LUT        86
  547. #define GD_TEXTURE_SHARP    87
  548. #define GD_TEXTURE_DETAIL    88
  549. #define GD_STEREO_IN_WINDOW    89
  550. #define GD_BLENDCOLOR        90
  551. #define GD_LIGHTING_SPOTLIGHT    91
  552. #define GD_LIGHTING_ATT2    92
  553. #define GD_AFUNCTION_MODES    93
  554. #define GD_TEXTURE_MEMORY_SIZE    94
  555. #define GD_IS_IGLOO        95
  556.  
  557. #if 0
  558. - unused 20,29,32,34,38,45-47,49,56,59,60,65,75
  559. - last entry = 95  UPDATE THIS WHEN ADDING NEW GD_* SYMBOLS !!!
  560. - cmd/gtst/util/Makefile assumes that there are no more inquiries upon
  561.   finding GD_NOLIMIT.
  562. #endif
  563.  
  564. /* return value for inquiries when there is no limit */
  565. #define GD_NOLIMIT        -2
  566.  
  567. /* return values for GD_WSYS */
  568. #define GD_WSYS_NONE        0
  569. #define GD_WSYS_4S        1
  570. #if 0
  571. #define GD_WSYS_X        2
  572. /* make public once we announce that X will be our window management system 
  573.  * of the future */
  574. #define GD_WSYS_PM        3
  575. /* make public once we announce that we will support PM */
  576. #endif
  577.  
  578. /* return values for GD_SCRNTYPE */
  579. #define GD_SCRNTYPE_WM        0
  580. #define GD_SCRNTYPE_NOWM    1
  581. #if 0
  582. #define GD_SCRNTYPE_ALPHAPLANES    2    
  583. /* just a placeholder; if we ever build this, this define will need to be 
  584.  * made public */
  585. #endif
  586.  
  587. /* 
  588.  * END defines for getgdesc 
  589.  */
  590.  
  591.  
  592. /* 
  593.  * START NURBS interface definitions 
  594.  */
  595.  
  596. /* NURBS Rendering Properties */
  597. #define N_PIXEL_TOLERANCE     1
  598. #define N_CULLING        2
  599. #define N_DISPLAY        3
  600. #define N_ERRORCHECKING        4
  601. #define N_SUBDIVISIONS        5
  602. #define N_S_STEPS        6
  603. #define N_T_STEPS        7
  604. #define N_TILES            8
  605. #define N_TMP1            9
  606. #define N_TMP2            10
  607. #define N_TMP3            11
  608. #define N_TMP4            12
  609. #define N_TMP5            13
  610. #define N_TMP6            14
  611.  
  612. #define N_FILL            1.0
  613. #define N_OUTLINE_POLY        2.0
  614. #define N_OUTLINE_PATCH        5.0
  615. #define N_ISOLINE_S        12.0
  616.  
  617. /*---------------------------------------------------------------------------
  618.  * FLAGS FOR NURBS SURFACES AND CURVES            
  619.  * WARNING: Any changes to these flags should be checked against the 
  620.  * decoding macros in nurbs.h.
  621.  *
  622.  * Bit: 876 5432 10 
  623.  *     |ttt|nnnn|rr|   :  rr - 2 bits = 1 if rational coordinate exists
  624.  *               : nnn - 4 bits for number of coordinates
  625.  *               : ttt - 3 bits for type of data (color, position, etc.)
  626.  *    
  627.  *
  628.  * NURBS data type
  629.  * N_T_ST         0     parametric space data
  630.  * N_T_XYZ        1     model space data
  631.  * N_T_TEX        2     texture coordinate data
  632.  * N_T_RGBA        3     color data
  633.  *
  634.  * Number of coordinates per datum
  635.  * N_COORD2         2     2 coords
  636.  * N_COORD3        3     3 coords
  637.  * N_COORD4        4     4 coords
  638.  * N_COORD5        5     5 coords
  639.  *
  640.  * rational or non-rational data and position in memory 
  641.  * N_NONRATIONAL    0     non-rational data
  642.  * N_RATIONAL        1     rational data with rat coord after rest
  643.  *
  644.  * N_MKFLAG(t,n,r) ((t<<6) | (n<<2) | r)
  645.  *    
  646.  *---------------------------------------------------------------------------
  647.  */
  648. #define N_ST      0x8    /* N_MKFLAG( N_T_ST,  N_COORD2, N_NONRATIONAL ) */
  649. #define N_STW      0xd    /* N_MKFLAG( N_T_ST,  N_COORD3, N_RATIONAL )     */
  650. #define N_XYZ     0x4c    /* N_MKFLAG( N_T_XYZ, N_COORD3, N_NONRATIONAL ) */
  651. #define N_XYZW     0x51    /* N_MKFLAG( N_T_XYZ, N_COORD4, N_RATIONAL )     */
  652. #define N_TEX     0x88    /* N_MKFLAG( N_T_TEX, N_COORD2, N_NONRATIONAL ) */
  653. #define N_TEXW     0x8d    /* N_MKFLAG( N_T_TEX, N_COORD3, N_RATIONAL ) */
  654. #define N_RGBA     0xd0    /* N_MKFLAG( N_T_RGBA, N_COORD4, N_NONRATIONAL ) */
  655. #define N_RGBAW     0xd5    /* N_MKFLAG( N_T_RGBA, N_COORD5, N_RATIONAL ) */
  656.  
  657. /* New versions of above constants */
  658.  
  659. #define N_P2D     0x8    /* N_MKFLAG( N_T_ST,  N_COORD2, N_NONRATIONAL ) */
  660. #define N_P2DR     0xd    /* N_MKFLAG( N_T_ST,  N_COORD3, N_RATIONAL )     */
  661. #define N_V3D     0x4c    /* N_MKFLAG( N_T_XYZ, N_COORD3, N_NONRATIONAL ) */
  662. #define N_V3DR     0x51    /* N_MKFLAG( N_T_XYZ, N_COORD4, N_RATIONAL )     */
  663. #define N_T2D     0x88    /* N_MKFLAG( N_T_TEX, N_COORD2, N_NONRATIONAL ) */
  664. #define N_T2DR     0x8d    /* N_MKFLAG( N_T_TEX, N_COORD3, N_RATIONAL ) */
  665. #define N_C4D     0xd0    /* N_MKFLAG( N_T_RGBA, N_COORD4, N_NONRATIONAL ) */
  666. #define N_C4DR     0xd5    /* N_MKFLAG( N_T_RGBA, N_COORD5, N_RATIONAL ) */
  667.  
  668. /* 
  669.  * END NURBS interface definitions 
  670.  */
  671.  
  672.  
  673. /* 
  674.  * START lighting model defines 
  675.  */
  676.  
  677. #define LMNULL            0.0
  678.  
  679. /* MATRIX modes    */
  680. #define MSINGLE            0
  681. #define MPROJECTION        1
  682. #define MVIEWING        2
  683. #define MTEXTURE        3
  684.  
  685. /* LIGHT constants */
  686. #define MAXLIGHTS        8
  687. #define MAXRESTRICTIONS        4
  688.  
  689. #if 0
  690. NB. DGL code assumes that all three types of properties have the same name 
  691. space.
  692. #endif
  693. /* MATERIAL properties */
  694. #define DEFMATERIAL        0
  695. #define EMISSION        1
  696. #define AMBIENT            2
  697. #define DIFFUSE            3
  698. #define SPECULAR        4
  699. #define SHININESS        5
  700. #define COLORINDEXES        6
  701. #define ALPHA            7
  702.  
  703. /* LIGHT properties */
  704. #define DEFLIGHT        100
  705. #define LCOLOR            101
  706. #define POSITION        102
  707. #define SPOTDIRECTION        103
  708. #define SPOTLIGHT        104
  709.  
  710.  
  711. /* LIGHTINGMODEL properties */
  712. #define DEFLMODEL        200
  713. #define LOCALVIEWER        201
  714. #define ATTENUATION        202
  715. #define ATTENUATION2        203
  716. #define TWOSIDE            204
  717.  
  718.  
  719. /* TARGET constants */
  720. #define MATERIAL        1000
  721. #define BACKMATERIAL        1001
  722. #define LIGHT0            1100
  723. #define LIGHT1            1101
  724. #define LIGHT2            1102
  725. #define LIGHT3            1103
  726. #define LIGHT4            1104
  727. #define LIGHT5            1105
  728. #define LIGHT6            1106
  729. #define LIGHT7            1107
  730. #define LMODEL            1200
  731.  
  732. /* lmcolor modes */
  733. #define LMC_COLOR        0
  734. #define LMC_EMISSION        1
  735. #define LMC_AMBIENT        2
  736. #define LMC_DIFFUSE        3
  737. #define LMC_SPECULAR        4
  738. #define LMC_AD            5
  739. #define LMC_NULL        6
  740.  
  741. /*
  742.  * END lighting model defines 
  743.  */
  744.  
  745.  
  746. /* 
  747.  * START texturing defines 
  748.  */
  749.  
  750. /* texdef param token values */
  751. #define TX_MINFILTER        0x100
  752. #define TX_MAGFILTER        0x200
  753. #define TX_MAGFILTER_COLOR      0xa00
  754. #define TX_MAGFILTER_ALPHA      0xb00
  755. #define TX_WRAP            0x300
  756. #define TX_WRAP_S        0x310
  757. #define TX_WRAP_T        0x320
  758. #define TX_WRAP_R        0x330
  759. #define TX_TILE            0x400
  760. #define    TX_BORDER        0x500
  761. #define TX_DETAIL               0xe00
  762. #define TX_FAST_DEFINE        0x0f00
  763. #define TX_NOCOPY                               TX_FAST_DEFINE /* obsolete */
  764. #define TX_FRAMEBUFFER_SRC                      0x1000 /* obsolete */
  765. #define TX_SUBTEXLOAD                           0x2000 /* obsolete */
  766. #define TX_FORMATTED_16bit_64x64    0x2000
  767. #define TX_FORMATTED_ABGR_8_128x128    0x2010
  768. #define TX_CONTROL_POINT        0xc00
  769. #define TX_CONTROL_CLAMP        0xd00
  770. #define TX_NULL            0x000
  771.  
  772. /* texture external formats */
  773. #define TX_EXTERNAL_FORMAT      0x700
  774. #define TX_PACK_8               0x710   /* just like STAPUFT 4.0 */
  775. #define TX_PACK_16              0x720   /* */
  776. #define TX_NOPACK_12        0x730   /* 12 bits in 12 lsb bits of short */
  777. #define TX_PIXMODE        0x3000
  778. #define    TX_BICUBIC_FILTER    0x4000    /* user bicubic kernel parameters */
  779.  
  780. #define TX_INTERNAL_FORMAT      0x600
  781. /* choices for TX_INTERNAL_FORMAT */
  782. #define TX_I_12                 0x610   /* 1-comp                      full    speed */
  783. #define TX_I_12A_4              0x610   /*        2-comp               full    speed */
  784. #define TX_I_8                  0x620   /* 1-comp                      full    speed */
  785. #define TX_IA_8                 0x620   /*        2-comp               full    speed */
  786. #define TX_RGB_5                0x630   /*               3-comp        full    speed */
  787. #define TX_RGBA_4               0x640   /*                      4-comp full    speed */
  788. #define TX_IA_12                0x650   /*        2-comp               half    speed */
  789. #define TX_RGBA_8               0x660   /*                      4-comp half    speed */
  790. #define TX_RGB_8                0x660   /*               3-comp        half    speed */
  791. #define TX_RGB_12               0x680   /*               3-comp        third   speed */
  792. #define TX_RGBA_12              0x670   /*                      4-comp quarter speed */
  793. #define TX_I_16                 0x690    /* should only be used in SHADOW mode */
  794.  
  795.  
  796. #define TX_MIPMAP_FILTER_KERNEL 0x900   /* seperable 8x8x8 filter kernel */
  797.  
  798. /* texture filter choices */
  799. #define TX_POINT        0x110
  800. #define TX_BILINEAR        0x220
  801. #define TX_MIPMAP        0x120
  802. #define TX_MIPMAP_POINT        0x121
  803. #define TX_MIPMAP_LINEAR    0x122
  804. #define TX_MIPMAP_BILINEAR    0x123
  805. #define TX_MIPMAP_TRILINEAR    0x124
  806. #define TX_BICUBIC                      0x230
  807. #define TX_SHARPEN                      0x240
  808. #define TX_MODULATE_DETAIL              0x250
  809. #define TX_ADD_DETAIL                   0x260
  810. #define TX_TRILINEAR                    0x270
  811. #define TX_MIPMAP_QUADLINEAR            0x280
  812. #define TX_BICUBIC_GEQUAL               0x290
  813. #define TX_BICUBIC_LEQUAL               0x2a0
  814. #define TX_BILINEAR_GEQUAL              0x2b0
  815. #define TX_BILINEAR_LEQUAL              0x2c0
  816.  
  817.  
  818. /* texture wrapping access choices */
  819. #define TX_REPEAT        0x301
  820. #define TX_CLAMP        0x302
  821. #define TX_SELECT        0x303
  822.  
  823. /* texture targets */
  824. #define TX_TEXTURE_0        0
  825. #define TX_TEXTURE_DETAIL       1 /* This binds a texture to the DETAIL texture resource */
  826. #define TX_TEXTURE_IDLE        2
  827.  
  828. /* texture environment definitions */
  829. #define TV_MODULATE        0x101
  830. #define TV_BLEND        0x102
  831. #define TV_DECAL        0x103
  832. #define TV_COLOR        0x200
  833. #define TV_SHADOW               0x104
  834. #define TV_ALPHA                0x105
  835. #define TV_COMPONENT_SELECT     0x300
  836. #define TV_I_GETS_R             0x310
  837. #define TV_I_GETS_G             0x320
  838. #define TV_I_GETS_B             0x330
  839. #define TV_I_GETS_A             0x340
  840. #define TV_IA_GETS_RG           0x350
  841. #define TV_IA_GETS_BA           0x360
  842. #define TV_I_GETS_I             0x370
  843. #define TV_NULL            0x000
  844.  
  845. /* texture lookup table definitions */
  846. #define TL_NULL                 0x0
  847. #define TL_TLUT_0        0
  848.  
  849. /* texture environment targets */
  850. #define TV_ENV0         0
  851.  
  852. /* defines for texgen */
  853. #define TX_S            0
  854. #define TX_T            1
  855. #define TX_R            2
  856. #define TX_Q            3
  857. #define TG_OFF            0
  858. #define TG_ON            1
  859. #define TG_CONTOUR        2
  860. #define TG_LINEAR        3
  861. #define TG_SPHEREMAP        4
  862. #define TG_REFRACTMAP        5    /* not yet approved! */
  863.  
  864. /*
  865.  * END texturing defines 
  866.  */
  867.  
  868. /* 
  869.  * START multi-byte character types for lcharstr and lstrwidth
  870.  */
  871.  
  872. #define STR_B    0x000
  873. #define STR_2B    0x001
  874. #define STR_3B    0x010
  875. #define STR_4B    0x011
  876. #define STR_16    0x100
  877. #define STR_32    0x101
  878.  
  879. /* 
  880.  * END mbcharstr defines
  881.  */
  882.  
  883. /* 
  884.  * START Distributed Graphics Library defines 
  885.  */
  886.  
  887. #define DGLSINK            0    /* sink connection    */
  888. #define DGLLOCAL        1    /* local connection    */
  889. #define DGLTSOCKET        2    /* tcp socket connection*/
  890. #define DGL4DDN            3    /* 4DDN (DECnet)    */
  891.  
  892. /* 
  893.  * END Distributed Graphics Library defines 
  894.  */
  895.  
  896.  
  897. /* 
  898.  * START obsolete defines - included for backwards compatibility 
  899.  */
  900.  
  901. #define GLDEF            __GL_GL_H__
  902.  
  903. #define PUP_CURSOR        PUP_COLOR
  904.  
  905. #define FATAL           1       /* exit from program after printing message */
  906. #define WARNING         2       /* print message and continue */
  907. #define ASK_CONT        3       /* ask if program should continue */
  908. #define ASK_RESTART     4       /* ask if program should be restarted */
  909.  
  910. /* high-resolution monitor */
  911. #define XMAXSCREEN        1279
  912. #define YMAXSCREEN        1023
  913.  
  914. /* medium-resolution monitor */
  915. #define XMAXMEDIUM        1023    
  916. #define YMAXMEDIUM        767
  917.  
  918. /* RS-170 */
  919. #define XMAX170            645    
  920. #define YMAX170            484
  921.  
  922. /* PAL */
  923. #define XMAXPAL            779    
  924. #define YMAXPAL            574
  925.  
  926. /* 
  927.  * END obsolete defines
  928.  */
  929.  
  930. #endif /* !__GL_GLCONSTS_H__ */
  931.